/**
 * 
 */
package dms.repository;

import dms.model.Classes;
import dms.model.Dormitory;
import dms.model.School;
import dms.model.role.Student;
import dms.model.util.PageIterator;

/**
 * @author 李健
 *
 */
public interface StudentRepository {
	
	Student createStudent(Student studentInfo);
	
	Student updateStudent(Student studentInfo);
	
	void deleteById(Long id);

	PageIterator<Student> findByDormitory(int start, int count, Dormitory dormitory);
	
	PageIterator<Student> findBySchool(int start, int count, School school);
	
	PageIterator<Student> findAll(int start, int count);
	
	/**
	 * 这里的query可以是寝室名称，班级名称，学院名称，系名称,学生姓名
	 * @param query
	 * @return
	 */
	PageIterator<Student> findByQuery(int start, int count, String queryStr);
	
	PageIterator<Student> findByClasses(int start, int count, Classes classes);
	
	Student findById(Long id);
}
